package org.lex.depends.core.resource;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;

public class ByteResource extends AbstractResource {
	private final byte[] bytes;

	public ByteResource(byte[] bytes) {
		this.bytes = bytes;
	}

	@Override
	public byte[] getContent() throws IOException {
		return bytes;
	}

	@Override
	public InputStream getInputStream() throws IOException {
		return new ByteArrayInputStream(bytes);
	}
}
